//package com.example.test.util;
//
//
//import com.spire.doc.Document;
//import com.spire.doc.FileFormat;
//
///**
// * @Author linwenf
// * @Date 2020/7/14 0014 13:56
// */
//public class SpirePDF {
//	public static void main(String[] args) {
////		String url = "http://47.108.112.194/#/papers/paperdetails?paper_serial=pa15941948473275dc";
////		String filename = "result.pdf";
////		String pluginPath = "F:\\下载位置\\plugins-windows-x64";
////		HtmlConverter.setPluginPath(pluginPath);
////		HtmlConverter.convert(url,filename,true, 1000000, new Size(600f, 900f), new PdfMargins(0));
//
////		PdfDocument pdfDocument = new PdfDocument();
////		pdfDocument.loadFromFile("G:\\上传测试\\试卷格式化1.4.pdf");
////		pdfDocument.saveToFile("格式化.docx", FileFormat.DOCX);
////		pdfDocument.close();
////		PdfDocument pdfDocument = new PdfDocument();
////		pdfDocument.loadFromFile("F:\\下载位置\\test.html");
////		String url = "http://47.108.112.194/#/papers/paperdetails?paper_serial=pa15941948473275dc";
////		String filename = "test.pdf";
////		String pluginPath = "F:\\下载位置\\plugins-windows-x64";
////		HtmlConverter.setPluginPath(pluginPath);
////		HtmlConverter.convert(url,filename,true, 1000000, new Size(600f, 900f), new PdfMargins(0));
//		Document document = new Document();
////		File file = new File("C:\\Users\\Administrator\\Desktop\\test1.html");
//		document.loadFromFile("C:\\Users\\Administrator\\Desktop\\test1.html");
////		Section section = document.getSections().get(0);
////		//设置页边距
////		section.getPageSetup().getMargins().setTop(10f);
////		section.getPageSetup().getMargins().setBottom(10f);
////		section.getPageSetup().getMargins().setLeft(10f);
////		section.getPageSetup().getMargins().setRight(10f);
////
////		//设置页面边框样式，颜色和位置
////		section.getPageSetup().getBorders().setColor(java.awt.Color.green);
////		section.getPageSetup().getBorders().getTop().setSpace(20);
////		section.getPageSetup().getBorders().getBottom().setSpace(30);
////		section.getPageSetup().getBorders().getLeft().setSpace(30);
////		section.getPageSetup().getBorders().getRight().setSpace(25);
//		document.saveToFile("测试1.docx", FileFormat.Docx);
//	}
//}
